package com.ecoolex.ying.space.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;
import com.ecoolex.ying.space.entity.EstateProjectActivityGoodsOrderRefundAudit;

public enum EstateProjectActivityGoodsOrderRefundAuditStatus implements EnumInterface<EstateProjectActivityGoodsOrderRefundAuditStatus, Integer>{

	WAITING_AUDIT(1,"待审核"),
    PASSED(2, "已通过"),
    REFUSED(3, "已拒绝");
    

	private int real;

	private String describe;

	private EstateProjectActivityGoodsOrderRefundAuditStatus(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	@Override
	public EstateProjectActivityGoodsOrderRefundAuditStatus realOf(Integer real) {
		if (Check.notNull(real)) {
			for (EstateProjectActivityGoodsOrderRefundAuditStatus v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
	
	public static boolean canAudit(EstateProjectActivityGoodsOrderRefundAudit refundAudit) {
		return WAITING_AUDIT.equal(refundAudit.getStatus());
	}
}
